Is it ok for pregnant women to received a DPT vaccine?

Yes. Acip recommends that pregnant women who have not been previously vaccinated with tdap should get one dose of tdap during the third trimester or late second trimester (after 20 weeks gestation). If not administered during pregnancy, tdap should be administered immediately postpartum. Instead of DPT ideally tdap or td should be given.
Yes. This is composed of non-living material that can help boost your immunity and increase the immune protection to these agents you pass to baby during pregnancy. This is one way to give them more protection, specifically from pertussis, that is most deadly in early infancy. The kids immune system is not ready for vaccines for 6-8 weeks after birth, so they are protected by what you transfer to them.