I'm pretty sure getting a filling is safe. I was just reading about dentist visits in my OB's booklet.
Here is what my OB's booklet says:

Having dental examinations and dental work such as fillings are not a problem during pregnancy. Treatment of gum and tooth problems reduces the risk of infection in your blood which could hurt baby. Having an anaesthetic injection or gas is also no problem. If your dentist gives you drugs to take at home, check with me before taking them.
I actually had a dental check up this morning. All went well! The dentist confirmed that I was pregnant and said everything was fine to have a check up. She just didn't lie the chair right back.