"Street-Smart" Altered Dominant Lines
To me, one of the biggest problems with jazz education is its tendency to "put the cart before the horse". Textbooks and courses often give the impression that their main purpose is to make students feel inferior if they haven't memorized a zillion scales and their relationships to every possible chord. When students do actually remember to use, say, the superlocrian mode of the melodic minor scale with an altered dominant chord, the result usually sounds like an exercise from a scale-study book!
So let me preface the following suggestions by emphasizing that if any line you play is not played confidently and purposefully with a good feel for time, it will sound lame regardless of how "hip" your note choices/scale choices are. Also, let me point out that the info that follows does not constitute the only way to think about playing on altered dominant chords. I have noticed over the years that students seem to have an easier time coming up with better lines on alt7 chords when they use this approach. Try it and see if it helps you.
Now for a little dose of "street smarts":
If you've tried to use melodic minor scales over altered dominant chords but have trouble remembering the right scale to use (or making it sound like much when you do remember it), try this: just think of a minor triad a half-step up from the chord you're playing on. For example, if the chord is E7(#9) or E7(#5,b9), try playing things you'd normally play on an F minor chord. (If playing on/spelling an F minor chord would be intimidating for you, you've got some work to do before you can use the rest of this!) Don't worry too much about what scale(s) you're playing; just try to play some lines that make sense to you. Listen carefully as you do this; some of the notes may sound better than others against the E7alt chord. Keep what sounds good and change what doesn't!
By itself, F minor contains the b9 (F), 3rd (Ab/G#) and #5 (C/B#) of E7alt. So by just using the triad alone, you'll get three very important notes that convey a lot of the flavor of an alt7 chord. Now start looking for notes to connect the triad's tones as you make lines. How to connect the F and the Ab? Maybe G; that'd be a #9 on E7. How to connect Ab and C? Well, Bb is the b5 of the E7; that's a good choice. How about using Bb and B as a "double approach" to C? Hey, it's your line, do it if you want! Maybe you'd like to include D and E since they're the 7th and root of E7? Sure; go ahead. Use some of these notes or all of them.
The important thing is that we're getting this stuff by thinking of chords first and not scales! Scales will happen anyway when you start looking for ways to connect the chord tones. (When you start to get really good at this, you'll realize that there's really just one scale - the chromatic scale, of which you can use as much or as little as you choose.) Your ears should tell you what does and doesn't sound good. Use them as much as possible! Eventually, you'll learn lots of scale names and possibilities for all kinds of chords. That stuff is in lots of books; just about anyone can read them. But your ears and your taste are what will make you sound different from anyone else, and you won't get that from any book. Some of the greatest players (Django, Charlie Christian, Wes Montgomery) had little or no theoretical knowledge, but they had incredible ears and artistic vision. The rest of us need a little help from theory, but we need to keep it in perspective: music theory is mostly about figuring out why something worked!