As long as the pills are legit pills and are in reasonable quantities then yes you can take pills you need through airport security.
You can take any kind of legit medicine through airport security in your checked baggage or in your carry on luggage.
That also includes any fish oil pills and other supplements as well as prescription medicine and if it's prescription medicine make sure you have the prescription for the medicine just in case the airport security asks you for the prescription to make sure it's your medicine.
I've had a few TSA agents ask me for my medicine prescription and it's a good thing I had it with me otherwise I would not have been able to take it with me on the plane and I needed the medicine.
Not all TSA agents have asked me for the prescription but I did have a few do so.