Supply noise due to Motor
I'm fishing around a bit and this graph is what I found. It tells you that the sensitivity of the device optically can be significantly changed in the presence of quite small variations of noise on the power line feeding it and this could be magnetically coupled or just a high-frequency loading effect the motor has on the battery which in turn gets dumped onto the sensor via its power wires: -



The graph tells me that as the "ripple" voltage on the power supply wires gets higher in frequency, the "effect" it can have becomes more dominant. Shown are ripple disturbances of 1kHz and 10kHz and I can envisage a scenario of 10 mV at 100 kHz having an effect. Even higher in frequency, I would say 1MHz at 1mV is likely to cause problems.

On this basis I'd consider having a local voltage regulator on the device just so the device power supply is kept as clean as possible. I don't know how long the cables are feeding the sensors but maybe if they could be shortened this might help too.

The capacitors you may have tried should not be electrolytic but rather they should be ceramic 100nF types. I'm aware that my answer may be missing the real problem but I'm just reporting worries on reading the data sheet.