Watch the Applying The Box E7(#9/b9) - Am7 - Dm7 online guitar lesson by Robbie Calvo from The Power of Five
To clarify, an altered dominant chord is a dominant seventh chord that has either a b9, #9, b5, #5 interval added to it. Many times altered dominant chords will have a couple of alterations added to them. E7(b9b5) for example. These alterations create tension in the chord and that increases the pull towards the resolution chord, usually a semitone below or 4th below to the I chord.
How do we improvise over these chords using the minor pentatonic scale though?
If we use a minor pentatonic scale from the minor 3rd degree above the root of the altered dominant, we'll get the b7 and all of the possible alterations. So, over an E7#9 chord for example we could use a G minor pentatonic scale.
Let's take a look at that scale and the chord tones of an altered chord and see how that all breaks down.
Scale Tones - G-Bb-C-D-F - #9-b5-#5-b7-b9 (all possible alterations)
Chord Tones E-G#-B-D-F## (G)
D minor Pentatonic Scale Tones - D-F-G-A-C - b7-b9-#9-11-#5
E Minor Pentatonic Scale Tones - E-G-A-B-D - R-#9-11-5th-b7
Using any of the above minor pentatonic scales will work nicely over the first 2 bars of our progression and create some outside tension notes. Shifting to A minor or E minor pentatonic will sound really smooth for measures 3 and 4.
We can also use the E minor pentatonic scale over the entire progression because it houses at least 3 chord tones for each of the chords in our progression. Here's the scale tones E-G-A-B-D you can analyze the chords against it ;-).