Originally Posted by Cheetah
inside of the ball would be optimal...
But I would work towards hitting the inside of the ball otherwise you might end up just using a 'down the line' stroke for your inside out shot.
It might be optimal in many cases but is not absolutely necessary. I have seen elite players hit the IO shot on the inside as well as the outside of the ball. If the OP is having difficulty keeping the ball out of the alley, I would suggest going primarily for the outside of the ball for a while. Here is Gary Sakuma (hi10spro) hitting IO forehands. While he hits some of them on the inside of the ball, many are on the outside (particularly in the 1st part of this video):