Don't use the Transfer function itself. Take a look at what it's doing.
If you open it up, you'll see it basically divides the spectrum of the response by the spectrum of the stimulus. The rest is housekeeping to make display easier.
So: Xfer = Response / Stimulus (In freq. domain).
If want a given response, turn that equation around and adjust your stimulus:
Response = Stimulus * Xfer.
In other words, take your stimulus signal, and get it's spectrum.
Multiply that spectrum by the Xfer function, and convert back to the time domain, before output to the amplifier.
Keep in mind that your Xfer function is the SYSTEM xfer function, meaning that it measures the xfer function of the whole system (D/A converter, amplifier, speakers, room acoustics, microphone, preamp, A/D converter).
If you want to output a sine wave, you could generate the spectrum directly, without generating a sine wave and taking it's spectrum, but that's another question...