The cop is wrong on several counts but you will probably need a traffic lawyer to help you on this one. I don't see a problem with his being out of uniform as lonng as he presented a badge. But the lane change violation is questionable. It sounds like you made him angry and he's trying to get back at you. Fight this one.
A cop who is there for the purpose of traffic enforcement should always be in a marked unit AND in full uniform. See Vehicle Code section 40800 et sec. If he was a traffic cop then your case should be dismissed. The legislature has spoken very clearly about how they want traffic enforcement to take place, and they do not want cops hiding behind billboards. We really would need more facts to properly asses the case, but this is a good starting point.
If you have been cited for any type of traffic ticket violation in the San Francisco Bay Area call me for a free consultation, (415) 378-4133 or visit our website at www.CaliforniaLegalDefense.com