There are some things you can do when faced with a ticket. The more people that will do this the better - don't just reach for your wallet.
Most people plead guilty with an explanation.
You have a right to plead not-guilty and you have a right to request a bench trial. This means that the court must schedule a hearing time just for you. You will be found guilty, that can be assumed. However, this ties up the municipal court and it keeps the officer off the streets making them safer for bicyclists and other annoyances to the local authorities. You have no right to a lawyer, even if you are destitute.