asumming a common BC548 (IC=100mA or so) in common emiter (for saturation purposes, let's asume a beta of 50) to get IC=10mA you need IB=10ma/50 = 200uA
to get 200uA from mcu pin,(asuming 5V mcu io, and common 0.7V Vbe drop) (5-0.7)V / 200uA = 21.5 kohm ... let's put a mere 22kOhm or a common 20Kohm (if you don't mind calculating, just do the 10K rule)
so, you will use 200uA from Mcu pin, if you drive a BC548 with a 20kOhm resistor
(yeah yeah, the most puritan electronics students will argue many things in all of this, but "hey, it works" and will drive your led in the optotriac (BUT don't forget to protect your led with a suitable resistor!!!))
BTW, it will protect your mcu in the way that: you don't draw too much current from the mcu (so it will not heat) and if something happens to the optotriac, the first one to burn will be the transistor and not your mcu.