Yes, getting a tooth filling while pregnant is generally considered safe. However, it's important to inform your dentist about your pregnancy. They may recommend postponing elective procedures until after the first trimester and will take necessary precautions to ensure the safety of you and your baby.