might be safe if used according to directions but it will do nothing to alleviate the cause of the pain.
Please see a dentist asap! Under almost all conditions you can receive dental treatment that is both safe to you and your unborn child. There are some basic precautions. Have your dentist discuss this with both you and your Obstetrician. Not getting proper treatment is often worse!