Can I play the pentatonic on the V chord on a i iv V progression? for example, I want to play over the chords Am Dm and E7, I can use safely the Am pentatonic over the chords Am and Dm, but the E7 has a note that isn't in the Am scale (The G#), and I wanted to know if it will sound bad if I use the Am pentatonic scale over the E7 chord, or do I have to change the scale while the E7 is being played?
gGoro You don't necessarily have to change the scale, but you should be mindful of how the note you play is going to affect the chord under it.

For example, if you play an A note over an E major (0r 7th, or minor), you basically get an Esus4. If that's what you're going for, great. If it isn't, then lay off the A note.

A minor pent is, A, C, D, E, G

Am is A, C, & E

Dm is D, F, A

E7 is, E, G#, B , D. Note the G#, whereas the G is natural in Am pent. However, since Em pent, (which has a G natural also),
is very often played over E major or E7, it gives a characteristic sound,. In fact, I think "that's why they call it the blues".

There is a 4 note overlap between Am & Em pent anyway. (E, G, A, D). So, to change the scale, all you need do is substitute the note B for C anyway.