You need a virtualhost for wiki.foo.com as follows:
Code:
<VirtualHost _default_:80>
ServerName wiki.foo.com
RewriteEngine on
RewriteRule ^(.*)$ http://www.foo.com/moinwiki [R]
</VirtualHost>
(wiki.foo.com must be in the foo.com DNS zone file for this to work)
Clearly you then need another virtualhost to host the
www.foo.com domain.