You can't redirect both versions in one statement. Well, you probably "could", but it's not the correct way how to do this. Correct way is this:
1) Redirect old domain from www to non-www version (do this in .htaccess file belonging to an old domain)
2) Redirect new domain from www to non-www version (do this in .htaccess file belonging to a new domain)
3) Redirect old non-www version of the old domain to a new non-www version of new domain (do this in .htaccess file belonging to an old domain)
So here is the drill:
1) This redirects old domain from www to non-www:
RewriteCond %{HTTP_HOST} ^www.olddomain.com [nc]
RewriteRule (.*) http://olddomain.com/$1 [R=301,L]
2) This redirects new domain from www to non-www:
RewriteCond %{HTTP_HOST} ^www.newdomain.com [nc]
RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
3) This redirects old domain to new domain (both non-www versions):
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,QSA,L]