Once an audio session has been set up the following code allows bluetooth input.
UInt32 allowBluetoothInput = 1;
AudioSessionSetProperty (kAudioSessionProper
as of iOS 5 this behaviour is not possible, quoting apple technical support
Bluetooth devices are not "Jacked In" devices and therefore any other audio routing must be user picked and cannot be changed in code. To do this, you can use the functionality of the MPVolumeView which will have an extra routing widget viewable allowing the user to specify the routing of the output.
There's a older thread on the Core Audio mailing list regarding this functionality but behavior hasn't changed:
http://lists.apple.com/archives/coreaudio-api/2009/Oct/msg00030.html
MPVolumeView reference:
http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPVolumeView_Class/Reference/Reference.html
However the MPVolumeView does not allow you to route the input and output independently.