What are the holes on an optical flow sensor IC?
These chips were designed for optical mice and are part of a multi-part assembly.
The outer rectangular holes are probably alignment features for the clip that holds the IC down during reflow soldering. The clip keeps the IC at the correct height and orientation as wells as providing a shield for the backlighting LED.

I talked to a friend of mine who designed some of the original optical mice chips for HP in the 90s. Since the die is mounted on the topside of the package, the lead frame is supported by pins during injection molding. When the mold and the pins are removed, the holes remain. 

Data Sheet Ref, page 3 &amp; 4. datasheet  You can also look at datasheets from other Avago parts at Digikey.