The docs page, while a good resource, is currently out of date.
Solidity source code needs to be compiled using OVM modified solc compiler. Because of the way OVM is architectured, the Optimism team needs to work to support specific Solidity compiler versions. Currently supported are v0.5 & v0.6, while work is started on v0.7 & v0.8.
The JS compiler can be found in ethereum-optimism/solc-js repo. Branches of interest are master-0.5
& master-0.6
.