Yes. Here are the instructions:
- Install and configure WP for www.example.com
- Configure multisite – can use either sub-domain or sub-directory
- Install WP Domain Mapping plugin – http://wordpress.org/plugins/wordpress-mu-domain-mapping/
- Create new site, e.g. site1
- Using Domain Mapping plugin, map site (site1.www.example.com or www.example.com/site1) to preferred sitename (site1.example.com)
I actually have two separate WP sites setup as above, one is sub-domain and another sub-directory. One of the sites is hosting 200 different hostnames. The other is in development and only setup for two hostnames.