You need to check all medications with your doctor first. As far as over the counter, tylenol is pretty much the only pain med that's declared "safe." I got a horrible burn when I was 24 weeks along and was put on pain meds (lortab) for 6 days for that, as well as steroids (prednisone) for five days. My doc said it was safe at that time. But you need to make sure you check with your doctor first!
You can take over the counter, tylenol is a safe bet while pregnant. Most prescription meds are risky. If you are taking , or want to take a prescription med, I would talk to you doc first.