Thanks for reaching out!
As far as I know I am not aware of any particular steps to integrate Optimizely with a site running behind a Varnish configuration. I checked in our Knowledge Base and could not find anything on this particular configuration. My assumption would be that you will have to create the static files yourself and ask Varnish to deliver each static file depending on the presence of the Optimizely cookies.
To better assist you, I could find some information on this topic that could be helpful to you:
I hope that is helpful.
I'm also having a Varnish caching issue. I'm using Drupal 8 on Acquia cloud hosting using their standard Varnish caching.
I am finding that when the cache is cleared, the first version of a page that is then loaded gets cached for all users. If it includes and experiement or not, that is what is then presented to all visitors.
Is that expected behaviour?