Trouble with triac driven dimmer circuit
The TRIAC driver that you chose (MOC3041) has a Zero Voltage Crossing detection circuit included. That means that you can't really control when to switch the TRIAC on. The Zero Voltage Crossing detection circuit will automatically turn your TRIAC on when the AC wave reaches a zero crossing point.

If you want to do dimming, you'll have to use an triac driver without Zero Voltage Crossing detection included, often called a Random Phase triac driver, like this one: MOC3052-M.