A modification like this one should work:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^.*/aa.jpg$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite\.com/?$ [NC]
RewriteRule ^.*\.(gif|jpg|png)$ http://www.mysite.com/temp/aa.jpg [R=301,L]