The cop may not have a racist bone in his body. BUT

Having the litterers do a "rap" suggests implicit racism in the same fashion as if he had made native Amerinds perform a "sun dance" or if he had forced persons of Indian extraction to say "ball point pen" a few dozen times. It is trading on ridicule that is based upon the ethnicity of the individual -- NOT kopacetic.

Don't mistake my point. I think sentences that involve a little public humiliation for minor offenses --e.g. wear a sign saying "I throw trash on my own city streets" for 2 weeks or making the fine $200 less $1 for each pushup you can complete or forcing a driver to put a sign on their car reading "I don't know what a red traffic light means" with one of those stupid smilies -- might be more corrective than simple fines etc.

However:

Such a penalty should be imposed by the polity via legislation and NOT the arresting officer.