There are several ways to do this but by far the simplest is to "force" the guard to answer the first question truthfully, like this:
Question 1: Will you answer this question with a 'Yes'?
No matter what answer the guard gives, it will be truthful. Therefore the guards next two responses will definately be lies.
Question 2: Is door 1 the safe door?
If the guard
answers 'No' then you know that door 1 IS the safe door, since you know
that the guard is lying.
Question 3: Is door 2 the safe door?
As above, if
the guard answers 'No' then you know that door 2 is the one to pick.