It's currently not possible, as the 1.18.1 version of OptiFabric will crash with fabric loader 0.12.9 (current Aristois loader). OptiFine will be added to the marketplace when the new loader is supported.