You can either study the legal issues to the point that you can effectively conduct a defense yourself (perhaps hard to do), or you can hire an attorney to help you defend against the charge (or try to cut a deal with the prosecutor), or change your plea to guilty and avoid the trial.
This comment is general in nature and is not intended as legal advice. It does not create an attorney client relationship and obviously is not confidential. You should contact an attorney in your area who can review with you all of the relevant facts and give you specific legal advice.
Contact a traffic ticket attorney in your area to find out what your options are. In OR, you cannot go through a yellow if it is safe to stop and it is basically the same ticket as a red light ticket. Sometimes there can be a traffic school option or deferred sentence, etc. Sometimes the court clerk may even know what the options are or be able to tell you what the court's procedures are. The officer who ticketed you has authority to amend your ticket or work with you to some degree if the court allows it. It's worth starting with either the court clerk or an attorney in your area.