Yes, it is perfectly safe unless your doctor tells you it isn't.
First and foremost, the penis DOES NOT poke the baby's head when you are having sex with your pregnant woman so do not worry that there is danger of the baby being harmed by the penis during sex.
If you look at an anatomy diagram of a pregnant woman, you'll see that there is plenty of space within the vagina to cope with an erect penis. This means that the penis will not come into contact with the baby as the vagina is angled away from the uterus.
The strong muscles of the uterus provide plenty of protection for the baby, as does the amniotic sac (also called the 'bag of waters'. It is the sac in which the fetus develops. It is a tough thingy so do not worry) and a mucus plug which seals off the cervix. So you can fuck till your heart is content.
Be aware that it’s pretty common for some women to experience bleeding during intercourse, especially in the first three months or so. This is caused by the normal swelling of tiny blood vessels in the cervix which can burst when irritated during sex.
It's important to keep in mind that some women may experience some complications which may make it difficult to have sex during pregnancy, otherwise if both mother and baby are doing fine, then sex should always be on the menu.