Watch the Rough Shape: Lead 1 online guitar lesson by Andy Aledort from Jam Night Vol. 1

When soloing over this type of two-chord vamp, I generally prefer to make direct reference to each chord in order to establish a strong connection between the melody of the solo and the harmony of the chord progression. I use that approach here as the lines directly reference G7 to D7 and back to G7.