Optical encoder help

For that small code wheel, I would recommend a much smaller optical sensor, like this one or this one, depending on the speed with which it needs to be read out.

The one you linked is very likely to be slow, and has a broad view angle, so it may not work in your application.

Pololu offers code and excellent support for their products.