The gate current would be 5v - Vswitch (.7v for transistor) - max gate voltage, then divided by the gate resistor, 5 - .7 - 2 = 2.3V. Set gate current for 10mA (twice the max listed), 2.3V/.01 = 230 ohm. If the triac falls in the "typical" range (Vgate = .9V), then the gate current = 5-.9-.7 / 230 = 3.4/230 = 14mA... just make sure this does not exceed max gate current (I use a triac rated at 60mA max gate current, and drive 7mA into it).
Or Voh (for micro Voutput high @ 10mA) - Vgate max = 3.3V - 2.0V = 1.3V. 1.3V / .01 = 130 ohms. If Voh approaches 5V, and Vgate = typical, then 5-.9 = 4.1V.... 4.1V / 130 ohm = 31.5mA. Make sure this does not exceed max gate current, which is not listed in the data sheet you provided. (do not confuse with max gate trigger current). NOTE: ATMEGA8 controller will source 40mA, most PICs will only source 20mA, except on the GPIO on the PIC12F683 which will source 90mA. This resistor may need to be adjusted so max output port pin SOURCE current is not exceeded. Read your microcontroller electrical specifications CAREFULLY.