Both are grammatical. The first makes a generic reference, that is, room temperature is a noun phrase which, in the words of the ‘Longman Student Grammar of Spoken and Written English', ‘refers to the whole class, rather than just one or more instances of the class.’
In the second sentence the prepositional phrase of 22C postmodifies room temperature and thus makes it specific. That in turn requires room temperature to be preceded by the indefinite article.
The Corpus of Contemporary American English has 2785 records for room temperature, of which 6 are for a room temperature. The figures for the British National Corpus are 267 and 4.