You can go to the dentist while you're pregnant. In fact, it's recommended to go to the dentist. They'll know what they can and cannot give you while you're pregnant.
*then go see your dentist.
Call your OB to see if there is any dental procedures that are off-limit, and then go see your doctor. It's not good to be in pain, and it's definitely not good if you get an infection. Get it treated.