Yes, a small amount of cod liver oil is safe.
But you need to be careful. Cod liver oil is rich in vitamin A. And too much vitamin A can be harmful to you and your baby.
The recommended amount of vitamin A for pregnant women is about 7,500 units or 750 micrograms of vitamin A. Twice that much should be okay. But there is no evidence to suggest that a greater intake of vitamin A is better than what is recommended.
If you already take a prenatal vitamin and eat a balanced diet, you are getting enough vitamin A. If you still wanted to take cod liver oil in liquid or capsule form, be sure to read the vitamin A dosage on the product label. Some companies add extra vitamin A and other vitamins to cod liver oil and cod liver capsules.
By the way: if you were considering cod liver oil as a way to get more vitamin D, then just take a plain vitamin D supplement instead. An example is a daily 1,000 IU vitamin D3 supplement.