It strikes me as a bad idea to actually upload into your App_Code folder. I'd use a separate folder which ASP.NET doesn't know anything about. That way you won't get the framework trying to automatically compile code for you.
You can easily compile and run code on the fly with CSharpCodeProvider - see my source code for Snippy for an example.
I hope this is only for internal (and authenticated) use though - I wouldn't recommend letting untrusted users execute their code on your web server. You can make it all slightly safer by running the code which very much reduced permissions, but you still risk the code tight-looping etc.
EDIT: In response to your updated question, you just need to provide the appropriate assembly to reference, containing IModule. See the CompilerParameters.ReferencedAssembles property.