If you write and mail a letter of complaint, and ask to file an official complaint against the officer, at the very least it will go into his record.
If the same officer picks on you again, you can file a civil suit against him, and ask for his employee file to be subpoenad' to the court that shows he has personally harassed you in the past showing foul on his part.