If you live in the US and it is a legitimate medical reason you can not get in trouble or get fired for it. That is the federal law. And you could sue the pants off of your work if they discriminated against you due to pregnancy. Though I would speak to your doctor because she should be able to write you a note saying that due to your medical condition (she does not even have to specify) that you should not work on your feet for more than a certain number of hours per day. If she is persistent saying "pregnancy hurts all the time" that is still classified as a medical condition and would still qualify as a valid reason. I had some severe back pain, I could not even lift my left leg to put my pants on, but luckily it eased up after a couple of days and was completely gone within a week. Maybe your pain will ease up too? You could also maybe ask your work if there are some light duty jobs that may need to get done during the day that would get you off your feet. Best of luck to you!
If you're unable to perform your job and are requesting less work and they don't want to yes they can fire you. If you have sciatica your doctor should write you a note. That's not just pregnancy pain. It's something extra.