Martin's given the showrunners an outline for the general plot up to the conclusion of A Song of Ice and Fire, so worst case scenario they can continue the show without him.
Though Martin also recently signed a two year contract with HBO to develop new programming, and has already stated that a Tales of Dunk & Egg spinoff is in discussion. He also mentioned that Robert's Rebellion would be covered by the A Song of Ice and Fire adaptation license, hinting that that may be possible as well.
So if the show did catch up to the books (which wouldn't be until at least 2017, possibly 2019...) they could easily put the show on hiatus and do a spinoff or prequel. The biggest concern, I think, would be that the actor's could potentially age really noticeably if a hiatus is needed between the adaptations of books 6 and 7.
On the other hand, Martin might simply not let that happen. Books 4 and 5 took especially long because he'd never had them planned in the first place. He's also already written at least half of book 6 and some of book 7. If he winds up under deadline pressure, he probably has the capacity to buckle down and finish them.