It's not so much selective as dependent on (probably) temperature. If the dragonfire is above (to put an arbitrary number on it) say 700 Kelvin, whatever is inside the flame has enough energy that the teleportation can happen.

Oh, also, if it's the scrolls , why don't we see them getting thrown into a fireplace instead?
McGack's avatar
Sparkle and her friends have spike who is the obvious quick incineration method of choice. However many others do not, wouldn't you say ponies all over equestria may need to contact their princess about this or that quickly wouldn't a handy quick scroll teleport system accessible to town/ city officials be beneficial in that regard? in fact maybe they don't all go directly to the princess herself we dont know exactly how everything works.
Its also not entirely impossible that Celestia has other students out there apart from twilight as well, what do they do when they need her immediately?
If it's a more widespread means of communication than something that one species of dragon just happens to make possible (I don't know, maybe they evolved magic fire so that lunch could be cooked and sent back to the nest at the same time and the mother dragon wouldn't have to leave the lair? (Or the mother is the huntress and the father stays home, whichever)) then why don't we see teleported scrolls used for any communication except Twilight-to-Princess-Celestia?
McGack's avatar
because the show is based around twilight and her friends