When should I fire the TRIAC's gate when controlling an inductive load (AC motor)?
You need to know when the AC line zero crossings are.  Unlike what others are saying, you are looking for the voltage zero crossings when turning on the triac.  This should be obvious when considering the triac is not yet on and therefore the current is zero.

You seem to be trying to measure the voltage zero crossings with the bottom circuit, but you may have to do some experimenting to get it to work well.  You are counting on the voltage being low enough to not turn on the LEDs at each zero crossing, which then turns off the transistor each zero crossing.  You therefore hope to get a small positive glitch each zero crossing.  Getting the LEDs to be off long enough for the transistor to turn off enough for the pullup to work, and then have all that happen with little phase delay is going to be tricky.

In one case I had to do this, I used two optos in push-pull configuration.  The LEDs were wired back to back, so each was on for 1/2 each line cycle.  The outputs were wired so that one pulled high and the other low.  The resulting output was a nice clean square wave with 50% duty cycle and the edges very close to the zero crossings.

In any case, once you have a signal per zero crossing, you simply add a variable delay before turning on the triac.  The delay can be from zero to almost half a line cycle.  The longer the delay, the lower the overall average voltage to the motor.  If the line frequency is 50 Hz, then a whole cycle is 20 ms, and a half cycle is 10 ms, so the variable delay period should probably be limited to 0-9 ms or so.

You will have to experiment to determine the average voltage the motor will see as a function of the delay.  You could calculate this if the load were known.  Your load has a unpredictable inductive component, so the triac will actually turn off somewhat after the next voltage zero crossing.  This delay will itself vary as a function of your turn on delay and as a function of what the motor is doing.  If your turn on delay is small, then the inductor gets most of the half line cycle to charge, so will take a while to discharge.  If your delay was long, then the inductor was only charged for a short time at low voltage, and will therefore take only a short time to discharge and reach the zero current level where the triac will turn off.

For low apparent motor voltages (long turn on delays), the turn off lag doesn't matter since the triac turns off before you attempt to turn it on again near the end of the next half cycle.  As you turn up the motor drive, and therefore decrease your turn on delay, eventually the inductor zero current occurs after your turn on signal for the next half cycle.  The triac will now be on the whole time, meaning you motor sees the full line voltage.  Shorter turn on delay wont increase the motor drive.  However, you still have a nearly full range of control over the motor, just that it's not spread evenly over the whole line cycle.  Small turn on delays are the same as continuously on.

Note this assumes that the triac is driven continously from your turn on delay until near the end of the half line cycle.  This guarantees the triac is on during the on phase of each half line cycle, regardless of what the current is doing.  If you don't do this and instead drive the triac with a short blip after the turn on delay, then two bad things will happen.  First, when the motor is full on and the current zero crossing from the previous half cycle occurs after the turn on for the next, the triac will then turn off at that zero crossing.  Second, the triac can turn off when there are short glitches in the current, as can happen with mechanically commutated motors.