You basically have a song with a key change. The first part is in F minor, the second in A minor. Having a C7 in the F minor part is quite normal in a minor key. The A minor section is as you have spotted related to G major, it is a mode of G and is called the Dorian mode. It is one of the most common ways of playing a minor progression, many people write songs like this without ever knowing what modes are.
The point your interested in is going back to the F minor section from the A minor part. As you have realised the C7 is good way to do this, but how to get to it from the D7?. The most common way to connect chords is a cycle of fourths, hence my suggestion of G7 instead of the A flat 7. However if you like the sound of the A flat why not use both. Try D7 to A flat 7 (tritone sub) to G7 to the C7. Or maybe replace the C7 with a G flat 7 (tritone sub) to give a nice chromatic line back to the F. Of course only suggestions, I have no idea how time, space and the groove might influence this.
The things you want to look into are cycles of fourths (or fifths) and tritone substitution. A good understanding of these will help understand a lot of progressions.
Edited by fletcher (23/04/12 08:56 PM)