The book i'm reading says that: in progression I-VIm-IIm-V7 (for example Bb- Gm7-Cm7-F7 ). The Gm7 can be subsituted by G7 because it's a V/II - IIm, yes. and the G7 is also the Eb7(nop, its Db7) because tritone subsituted, yes. But how can many musicians playing as G Dorian, or even G minor-Major on the Gm7 chord?
I don't want to sound flippant, but because it sounds good. Dorian, aeolian (natural minor), harmonic and melodic minor can all be substituted for each other depending on context and/or the sound you want. There are other substitutions too. The minor seventh chord appears as a II, III, or VI chord in major keys, so that means, depending on the context, dorian, phrygian, or aeolian scales can all be played over a m7 chords.
The Beach Boy's "I Get Around" uses your suggested progression with a VI 7th chord (as supported by Brian's bass part). This motif is very common in barbershop quartet, which predated and influenced the '50s "Four Freshman" sound, and Brian's '60s vocal arrangements.
A traditional diatonic motif insists on the VI chord being minor (or minor 7th).
What you're doing is a jazz synthesis of the traditional and barbershop motifs, by including both notes defining the VI minor and major (with flatted 7th added).
It's because the note that changes vim7 to vimMaj7 serves as a leading tone to the tonic of ii; a kind of altered V/ii.
So in your example the Bb in g min(which would want to remain constant to become the b7 of c min) is replaced by a B, which wants to resolve upwards by a semitone to become the tonic of the c min.
Correction...you ask about minMaj 7 in the title of your post, but dom7 (G7) in the body. If vi min is replaced by VI7 it is just a tonicization of ii, a V/ii.
As I'm sure your book mentions, the most common altered tones against a dominant chord are the diminished 5th, the augmented 5th, the diminished 9th, and the augmented 9th.
If Tim's guess is correct that you mean to ask why can Gm notes be played over a G7 chord, it's because, when played against a G7 chord, the Bb is interpreted as an A#, i.e. an augmented 9th rather than a minor third. Similarly, the Eb is interpreted as a D#, i.e. an augmented 5th rather than a minor 6th.
G Dorian, with its E natural instead of Eb, is even more consonant against a G7—the only altered tone is the Bb (which, again, is interpreted as an A# or +9).
In fact, thinking in these terms, you can play any of the related modes of Gm: Bb Major, C Dorian, etc. And you can play any of the related modes of G Dorian: F Major, C Mixolydian, etc.
You can also consider modes of Eb Major, since the altered tones of Eb relative to G7 are Bb (i.e. A#, the sharp 9 of G7), Eb (i.e. D#, the sharp 5 of G7), and Ab (the flat 9th of G7). For example, you can play, say, D Phrygian over G7, and it'll work just fine because relative to a G7, its altered tones are a flat 9, a sharp 9, and a sharp 5.