The rule is, if your hypothetical scenario suggests something that isn't true, use were:
If I were stronger, I'd break your arm!
(I'm not stronger.)
If I were a flower, I'd go crazy!
(I'm not really a flower, though I've been called a pansy before.)
If my room were clean, it would be a first.
(My room isn't clean.)
If it may be true, use was:
If this answer was poorly constructed, it may have been due to the fact that I was really tired.
(It may be poorly written.)
The same rules apply to sentences with though:
He appears as though he were homeless.
(He's not homeless, yet, although keeping up his current dressing habits could result in such.)
This is addressed, among other places, on pages 56-57 of my favorite reference book, "Woe Is I" by Patricia O' Conner.
Also see http://m.grammarbook.com/grammar-rules/subject-and-verb-agreement.aspx from which I quote:
Rule 10. The word were replaces was in sentences that express a wish or are contrary to fact:
Example: If Joe were here, you'd be sorry.
Shouldn't Joe be followed by was, not were, given that Joe is singular? But Joe isn't actually here, so we say were, not was. The sentence demonstrates the subjunctive mood, which is used to express things that are hypothetical, wishful, imaginary, or factually contradictory. The subjunctive mood pairs singular subjects with what we usually think of as plural verbs.
Examples: I wish it were Friday. She requested that he raise his hand.
In the first example, a wishful statement, not a fact, is being expressed; therefore, were, which we usually think of as a plural verb, is used with the singular subject I.
Normally, he raise would sound terrible to us. However, in the second example, where a request is being expressed, the subjunctive mood is correct.
Note: The subjunctive mood is losing ground in spoken English but should still be used in formal speech and writing.