I would try directly offering the leftovers to a homeless person first before just leaving it on the trash can. If nobody picked it up right away the wind would probably blow it into the street, wrapper and all.
I used to do that when I lived in Milwaukee, and people were happy to take the food. If nobody was around I left the food on the ground next to a trash can.
However in Madison, sometimes good intentions can have a different outcome. A couple of years ago, I saw a college student on State Street offer a panhandler some extra tacos he had leftover from some place like Qdoba. The panhandler (who was holding a sign saying he was panhandling for food) wasn't too eager for the handout. He only took it after the college student assured him it was vegetarian.
It was almost like a scene from a Seinfeld episode.