I think you can do this by constraining the fare basis codes. See:
http://www.flyertalk.com/forum/5548893-post12.html
EDIT: Actually, that doesn't seem to work and I'm not sure why. It does work for specifying coach buckets, but I can't get it to work with business or first buckets.
e.g. from: ord :: ua / f ua..y-
to: sfo
returns flights from ord-sfo in y-class, and sfo-ord in cheapest available coach.
however, replacing the y with f or c causes an error.