To my ears, "opt" always needs a preposition after it.
Looking for exceptions, I hit on this article, which purports to list the prepositions which can follow "opt", in order of frequency. The most common is "for" followed by "out", "into", "to", and "in".
Of course the one you choose (or "opt for") depends on your specific circumstance.
In your examples (where the thing to be selected is a simple noun), "opt for" is appropriate.
Which Subjects did you opt for?
I opted for philosophy; he, however, was thinking of opting for criminology.
In the second sentence, using that expression twice sounds a little clumsy though. One of those opt fors could be replaced by a form of "to choose", which means exactly the same thing. Something like:
I chose philosophy; he, however, was thinking of opting for criminology.
But "opt" without any preposition (as in: "Which subjects did you opt?") is not idiomatic.