How do I route the output of a single program to a mic input?

To redirect to mic input is not possible AFAIK, but fortunately it is not needed. What you have to do is just set up a new pulseaudio SINK which will automatically have a monitor SOURCE. No external programs needed, pulseaudio does the job. (Basically to accomplish such things is why pulseaudio was developed.)

So the question is whether you want to hear the sounds which you redirect to your new sink? (Play it on your speakers.) Or you don't.

If you DO want to hear what you are redirecting then follow the technique what I use for sending music over skype:

  1. Get the name of your default sink:

    pactl list sinks
    

    In the output search for the name of the sink. It will be something similar to this: "alsa_output.pci-0000_00_14.2.analog-stereo"

  2. Run the following command with the appropriate change in the master= section to your above found default sink name:

    pactl load-module module-remap-sink sink_name=secondary master=alsa_output.pci-0000_00_14.2.analog-stereo
    
  3. Open the application FROM which you want to redirect sound and start playing the sound in it.

  4. Open the application TO which you want to redirect sound and start recording in it.

  5. Start pavucontrol (If you don't have it: sudo apt-get install pavucontrol)

  6. While your applications are playing/recording sounds: In pavucontrol, on the Playback tab change the sink from what it is on (Built-in ...) to the remapped sink (Remapped Built-in ....) for your application. On the Recording tab make similar changes for your recording application: change it to something like Monitor of Remapped...

  7. Still in pavucontrol on the Input devices and Output devices tabs: change Show: to All Input devices and All Output devices and make sure that the remapped sink and its monitor source is not muted and have enough volume.

  8. After this your setup should be working.

If you want to make your new sink to be automatically setup when pulseaudio starts: Edit the /etc/pulse/default.pa file and add the following line with your default master sink name in it (You will need root permissions to edit the file, so use sudo or gksu)

    load-module module-remap-sink sink_name=secondary master=alsa_output.pci-0000_00_14.2.analog-stereo

Pavucontrol stores our changes (or at least for me it does), so next time you won't have to redirect the sinks-sources in it. (But if it won't save it for you, then do redirect them when you need.)

If you don't want to hear the sounds what you redirect then use simply

 load-module module-null-sink

in the appropriate places (without sink_name or master section) and change the redirections in pavucontrol similarly as you did with the remapped sink but now with the null-sink and its monitor.