How to ask a question to confirm a negative situation?
The only more concise way to ask it that I can think of is
Was Tom in Professor X's class?
However, this changes what you're asking from confirming your belief that he was not to asking in a neutral fashion (that is, you have no a priori belief).
If you're wanting to keep it as a confirmation, something like your second option above is about as good as it gets:
Tom wasn't in Professor X's class, right?
OP assumes that
Wasn't Tom in Professor X's class?
is a 'loaded' question. It implies the speaker thinks Tom was in the class, and therefore expects a positive confirmation from whoever is being asked.
But OP also assumes that
Was Tom in Professor X's class?
is a 'neutral' question, simply because that's the default way we parse the question when we read it. But it's a spoken question! To make it 'loaded' in the 'negative', the speaker simply stresses the first word WAS!
"Tom wasn't in Professor X's class, right?"