A local attorney may be able to work this out for you. It is not a simple answer as a prosecutor has discretion to dismiss your ticket or to proceed. The letter of the law does not always control the outcome of the case.
In my experience as a former Prosecutor most judges and Prosecutors favorably view any Defendant who is proactive in taking rehabilitative action before sentencing or a plea even. The fact that so many defendants do nothing makes those that do really stand out positively. It costs nothing to go to AA/NA meetings and keep a log showing you are addressing your issues. Once you get an evaluation from the acceptable court mandated agencies there is no reason you cant start right away before you...
Yes, you should have an attorney as some judges may be more likely to terminate these conditions earlier than others. You may also be told to come back in a period of a few months. There has to be a good reason also and not just that fines were paid and classes were completed. Some examples include military service, educational and career opportunities etc.
You may not want to rush into paying a fine and pleading guilty as your license may be suspended as a consequence of conviction. Depending on the circumstances you may be eligible for an amended ordinance charge or a deferred prosecution.