The 100% guaranteed way to ensure the show doesn't spoil anything from the books is to read them all first. That should go without saying, and that's the path I recommend. But if you insist on jumping into the show while you're still reading, here's a rough guide.
There's a pretty strong correlation between the first two books and the first two seasons. Season One, in particular, is almost a word-for-word adaptation in many parts. You could probably start watching those immediately after reading the respective books.
Season 3 is where things get tricky. Individual storylines differ in pacing. For example, Bran's Storm of Swords storyline is completely finished by the end of Season 3, while Jon Snow's only ends up about 1/3 completed. Things get even murkier in Season 4, when several characters start to make significant inroads to their Feast for Crows/Dance with Dragons storylines.
I'd recommend at least reading all the way through Storm of Swords before tacking Season Three, since Bran and Jaime's entire arc is in Season Three. In addition, episode one reveals something crucial about the character Arstan Whitebeard that is a mystery throughout the book.
But I strongly recommend reading all the books before starting Season Three. Season Three immediately reveals the fate of a major character whose fate is a mystery for two whole books.
But I definitely, definitely recommend reading all the books before Season Four. Dany, Bran, Brienne, and the spoilered character above all have parts of their Feast for Crows/Dance with Dragons storylines in that season.
EDIT: One thing I should add is that the show often makes things explicit which, in the books, are only hinted at or revealed over time. This happens as early as the first two seasons, in which much of ambiguity behind characters like Littlefinger and Margaery Tyrell are stripped away. They aren't spoilers, per se, but it could diminish your enjoyment in reading the books.