Zero crossing detector: do I really need the 7W resistor?
Consider replacing the optocoupler chosen, with one that is designed for direct interface to a mains power line. For example, Fairchild Semiconductors MID400 is one such part.
Use a much lower LED current. While your opto may specify a fairly large (20mA to 100 mA, even 1 A in some cases) drive current for the LED, many will work fine at as little as 1 to 2 mA: The part's transfer curve should provide enough information to confirm this.
A capacitor can be used as an impedance element for dropping the input AC voltage, instead of the resistor. As the voltage drop is almost entirely pure reactive, there is hardly any thermal dissipation to be concerned about. You do however require "X" rating capacitors, designed for use in AC mains circuits.