As long as the playback routine is in sync I should be able record it as one file. The GMmidi sounds on my PC don't sound as good as the one from Keyboard, but I'm sure I can find us an FM synth as a plugin and use this instead of sampled sounds for the MIDI.
The problem with a lot of the GM sounds in modern PCs is that they are software generated, rather than hardware generated. The old Soundblaster cards had an actual Yamaha FM synthesis chip on them. Nowadays the GM sounds are often generated via Microsoft's built-in Windows GM software sound set. So there is latency with the software method resulting in the delay you are experiencing.
So, yes, either hook up a hardware MIDI keyboard or sound module, or find some way to delay the audio track in a DAW by the same amount that the MIDI track is delayed. i.e. render the MOD audio to a 16-bit WAV file in OctaMEDSS, save out the MIDI data as well to a MID file. Load both the audio and MIDI file into a multitrack daw (each on a separate track) then drag the audio slightly to introduce a slight delay that matches up with the latency of the software GM sounds.
The methods above, outlined by others, will also work.