Well... you can, by providing enough litter bins that people don't have to hold a cigarette butt or a dog-poo bag for half a kilometer or more. Unfortunately, since litter bins cost money to operate, most cities don't put up enough.
For toilets, it's the same. Public, free-of-charge toilets are an absolute rarity... and politicians whine all the time about people just relieving themselves on the next bush.