You may be protected by the Americans with Disabilities Act (ADA). Under the ADA, an employer cannot discriminate based on disability. However, if over time the disability no longer exists, if the medication is interfering with your ability to perform essential job functions with reasonable accommodations, or if you are taking the medication illegally, then you can be fired.
For more information on disabilities and the workplace, such as what is considered a disability and what constitutes an essential job function, please visit our disability discrimination page.