Once I've written the song, I'll usually drop a MIDI drum loop and play along with my guitar. I'll adjust the tempo until I find the right pace. Then I'll record the audio tracks and specific MIDI parts.
Sometimes I change my mind and have to erase the audio to adjust the tempo (i know you can time-stretch, but i prefer to let my performance fit naturally). The rare time that the song tempo will change mid-way through, I program it into the project (Time View, i believe - not at my DAW now). That way the MIDI fits properly, and i follow along organically with the "real" instruments.