If I have OptiFine, can I play with someone who doesn't have OptiFine? [duplicate]
Optifine is a client-side mod, it only changes how things look for you. Just like a resource pack, the server doesn't need to care about it. So yes, Optifine is fully compatible with Vanilla servers.