In Europe, they use what's called a "Bottle Trap" for this situation. However, they are illegal in many parts of the USA because they rely on interior partitions for their trap seal and if the design fails due to corrosion, etc. sewer gas can enter the home (and you can't tell if it's failed without taking it apart, and can't take them apart so you can't tell if it's failed... unless there's a stink). They certainly aren't as cheap as a P-Trap either.
Here's some pictures, prices, and links to bottle traps if they're allowed in your area. http://www.nextag.com/bottle-trap/search-html