As Dave indicates, you can set your output modules up to create two movies: one with just the matte (Alpha) and one with just the fill (RGB).
The trick that a lot of people miss is the one that Dave led with: Have two output modules for the same render item. That way, you render once, and After Effects uses that same set of rendered frames as the basis for creating both output types. This is one of those things that saves huge amounts of time when you’re encoding to various formats, et cetera.
Here’s a link to the output module settings section of After Effects Help.
Todd Kopriva, Adobe Systems Incorporated
putting the ‘T’ back in ‘RTFM’ : After Effects Help on the Web
If a page of After Effects Help answers your question, please consider rating it. If you have a tip, technique, or link to share—or if there is something that you’d like to see added or improved—please leave a comment.