My question involves a traffic ticket from the state of: California

So I know what flashing red lights mean, but I feel that I have been unjustly sentenced. I'm not sure what I'm more upset about, the citation itself, or the fee due ($500).

Here's my story:
I am pulling up to an intersection. It is in the evening. Prior to the intersection there are flashing red lights, railroad tracks, space for one car, a crosswalk, then the intersection itself. The distance between the flashing red lights and the intersection is about 50 ft. The flashing lights flash whether the intersection light is green, or a train is coming, or a train is not. They are designed and put in place to flash only when a train is coming, but set to always flash for some reason.
I approach the lights. As this is a 'downtown' area, and the intersection light is red, I am going no more than 15-20 mph. I cruise through the flashing reds slow and steady (I didn't notice them anyways as I do not live in the area and it was late and I was tired) with no train, pedestrians, or other vehiclesand stop at the red light. I am making a right turn, so I wait a few moments and turn right. I do not exceed the speed limit at any time and have a police officer behind me in seconds, tailgating me so with beams in my mirrors ( I hate it when they do this and don't understand why they do). She pulls me over and gives me a ticket. While she's writing it up, I noticed that a civilian stepped out of the car and was hanging outside of the police car.

So my issue. It sucks that I got a ticket, but it sucks more that it is $500.00! I haven't gotten any ticket for about 8 or 9 years now, and the last one was for going 95, which only cost me about $250.

Any suggestions on way to fight, or at least lower the citation fee?

tia