This is a pretty big deal. You actually could have been arrested on the spot, so, lucky you on that one. You will face several hundreds (additional court fees might bring this to thousands, but not sure on that one) in fines, a license probation or even suspension is on the line, and, seeing as how it is a criminal charge, is something that could be attached to your "permanent record" for many, many years to come. If you have a CA license, I'm not exactly sure how this would play out if convicted.
One this is clear: you NEED a lawyer. Do not think you can't afford one, because you likely can't afford to not have one (reducing/preventing an insurance premium increase will likely pay for itself in this regard). A local attorney knows best what the courts want to hear, and as such present the highest potential in yielding the most favorable results. Many attorneys will offer free/cheap consultations, so you should take advantage of this and sit down with a couple to see what insight they may have to offer.