You should hire an attorney and provide copies of all the relevant paperwork that you have (receipt for the fine, taking the class, etc.). Given the circumstances, your lawyer might be able to convince the prosecutor and/or judge to dismiss the case. That is not guaranteed, however, but you at least have a shot.
If you cannot afford an attorney, and if it is a criminal charge of driving on a suspended license (rather than just a traffic infraction), you are entitled to legal representation and the court will appoint a lawyer to represent you. But unfortunately, you are not entitled to a lawyer for traffic infractions that are not criminal.
Driving on a suspended license is a Class 1 misdemeanor, but failure to have proper notification is a defense to the charge. Bring an updated copy of the DMV record, and anything else from the DMV that notes the issue. The judge will ask both you and the officer about the notification and you can explain to him your issue, specifically pointing out the discrepancy of when you took the class and when it showed up on your record.
It is required that you be notified of your suspension before you can be convicted. The prosecution will attempt to prove this through admissions of guilt to the police officer, by official notifications sent by mail from the DMV to the address on your license, and by documents signed by the defendant at court.
In your case, official notifications sound like the most likely possibility. Get a copy of your DMV record and look for the suspension paragraph and look for notification.
I would also consult a local attorney about your specific jurisdiction because the outcome of your case will be very dependent on the judge you draw. I would also highly recommend hiring an attorney.
Luke J Nichols
Spectrum Legal Defense