The California Orange County traffic court site notes that you cannot attend a driving course unless approved by the court clerk or judicial officer. There are certain rules that apply to attending traffic school including that you do not have a commercial driver's license and that the offense did not occur while you were operating a commercial vehicle.
Further research shows that effective September 20, 2005, commercial drivers (CDL holders), are no longer able to remove or mask a traffic ticket by taking a driving course. This is a directive from the Federal government that states that CDL holders became ineligible to attend traffic violator school for the purpose of removing a traffic violation on his or her driving record, regardless of the type of vehicle driven.
California Vehicle Code (VC) 42005 can give you more information on the restrictions on taking traffic school (driving instruction) in CA. Title 49 of the Code of Federal Regulations will give you more information on the new guideline regarding traffic school and a CDL holder. There is also a CA memo explaining the changes that took place in 2005 at www.dmv.ca.gov/pubs/olin/olin.htm.
More information can also be found at the California DMV site.