To render a model as a matte black or white on a transparent background:
Firstly, for the black matte image, simply switch the lights off! Locate the lamp being used in the Outliner panel at top right. Click the eye and camera symbols off. (they're at the extreme right)
Next we make the background transparent -
At right in the properties panel (under the outliner panel) click on the camera icon. (at the left)
Go down to the shading tab, open that and at the right change "Sky" to 'Transparent'.
Close the tab and go down further, open the Post Processing tab and make sure both the sequencer and Compositor boxes are UNTICKED. (precautionary step) Close that tab and -
Further down again, open the "Output" tab. Set the format (just under 'Placeholders') to "PNG". At the extreme right again you'll see a button called RGBA. Highlight that (click on it). That's your alpha channel.
While you're there check the output folder is where you want the image to end up.
We're almost set up but you might want to change the pixel resolution for your images and can do that back at the top. Open the "Dimensions" tab and set the xy pixel sizes. (I use the 100% option just under those slots and also make sure the "Time Remapping" figures remain at 100 & 100)
That's the output set. Close the tabs, get back into the 3D window and press N.
The window's panel will appear. Open its "Display" tab and tick the "Only Render" box.
If you're wanting to render using Blender's internal renderer you'll have to position the camera for the view you're after.
If you're a little on the lazy side like I am, you'll render it out as it appears already, using the OpenGL renderer which is much much faster, particularly for video. That can be accessed at top left of the window from the (amazingly) "Render" menu !
To make sure the pic does render, change the timeline's frame range from 1 to 1.
Go back to the Render menu (at top) and click on "OpenGL Render Animation".
The pic will appear in the output folder. When viewed in Gimp or Blender's Video Sequence Editor, you'll see the black model with a checker pattern behind it. That's the alpha layer.
Make sure you rename the pic file because the white model is about to write using the same filename.
The white Model -
Change the Model's material colour (diffuse) to white with slider up all the way.
Turn the Specular slider back to zero.
Sllde the shading "Emit" slider to full. (2.00) It often comes out a little brighter than 'shadeless' this way.
...and you're all set to go. (You don't need the lights)
Render that out and you've got what you want !
The Blender file is attached, it's settings left at the white cube on transparent