Should I apply to tenure-track positions if I'm fairly certain I won't be staying?
Apply. 

If you accept a position, you are committed for the following year. Leaving after two years will disappoint people, but it happens fairly often, and the potential consequences of you not applying to these jobs are perhaps more serious than the potential consequences to the departments if you leave after two years.

Besides, I don't know what your circumstances are, but you are presumably not completely sure you won't stay.