Yes, there are plenty of optoisolators that can do what you want. Look around at the usual suspects, like Mouser, DigiKey, or whatever your favorite supplier is. There should be plenty to chose from, especially if you can live with a few µs delay.
You cannot smoothly dim a normal incandescent light bulb with zero-crossing control of normal 50/60Hz single-phase mains- the filament (even a really fat high-power one) will visibly flicker to an objectionable degree with even a small number of possible levels of control. Similarly, radiant heating is problematic with zero-crossing control because the temperature can change significant within a small number of cycles. In those cases, phase control is typically used.
Normally for zero crossing control we would like a cycle length of several seconds or more (up to maybe 30-60s), so that the number of half-cycles is at least in the low hundreds. That limits the applications to those where the low-pass filter formed by the heat capacity of the various elements will smooth out the power, so generally those applications with a time constant in the 1minute + range.
Phase control has problems that zero-crossing switching does not have (more EMI, there may filtering required for EMC compliance, undesirable audible noise from lamp filaments, nonlinear response power-vs-trigger angle). On the other hand, zero crossing switching of high current loads can cause visible light flickering (otherwise independent lights that happen to be powered from the same mains circuit).
For phase control or for zero crossing switching you need zero crossing detection. In the case of zero crossing switching, the micro can delegate that job to the triac driver and just tell it roughly when it wants the triac on or off, and the driver and triac will respond with some latency depending on when the zero crossing happens to hit.
There's a third alternative- the simplest- random switching, where the triac just switches on whenever it is asked to (and switches off at the zero crossing, since that's all it can do).
If you implement a zero-crossing detector for a micro and drive the triac with a non-zero-crossing opto (or use a random switching SSR) then you can select any of the three options with firmware.
Best Answer
Devices such as the MOC3041 will only turn on as the supply goes through zero - this is desirable for controlling loads such as heaters or motors as it can reduce the interference they cause and avoid getting partial cycles. The load will be either fully on or fully off. Any PWM that is desired can only be performed at a very slow rate - this is acceptable for heaters where the response time may be many minutes.
The load can only be controlled for complete cycles (or half-cycles) of the AC supply - this is not what is required for controlling the intensity of a lamp by using phase control where a fraction of a cycle is desired. The lamp would flicker unacceptably