Antibiotics while pregnant

Can you take penicillin while pregnant? I have a tooth infection. ☹️