You can find a few variants here: Https .htaccess - #2 by byybora
The non-www with ssl is probably the most suitable:
# force non-www with ssl
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]