Pizza box rear light
One possibility is to mount the tail light on your bike's seat stays. As an example here are a couple pictures of my preferred tail light (the cygolite hotshot) mounted to the seat stay of a cross bike:





There are a bunch of options out there for this sort of mounting, from lights specifically designed to be mounted on a seat stay to ones that come with seat stay mounts in addition to the normal seat post mount. 

A few things you want to keep in mind when choosing/using a seat post mounted tail light:


Make sure the light's mount has enough adjustability so you'll be able to correctly aim it. 
Make sure the light's mount will fit properly on your bike's seat stay. For instance, the seat stay mount for the cygolite hotshot I use won't fit on the extra skinny seat stays on either of my road bikes but fits fine on my hybrid and CX bikes. 
When mounting the light, make sure it is extra secure, you don't want to risk the light getting knocked into the bike's wheel because it was installed too loose.


Another possibility is a rack mounted light. Again like the seat stay mounted tail lights, there are lights specifically designed for rack mounting as well as mounts for that allow other tail lights to be used with racks. In the example of the cygolite tail light I use, there is an optional rack mount available, although I was actually able to adapt an old rear reflector mount to serve in this capacity.