If current_light_intensity
really is proportional to current light intensity, then you can do something like this:
distance = 1.0/sqrt(current_light_intensity); /* range is 1/sqrt(4095) to 1 */
distance = (distance-1.0/sqrt(4095.0))/(1.0 - 1.0/sqrt(4095.0)); /* scaled to [0,1] */
motor_speed = ceil(8.0 * distance);
If, as is often the case, there are a lot of non-linearities in the system (e.g. photosensor saturation), you may have to adjust the speed(intensity) function by hand, which isn't very difficult. Just construct an array of threshold intensities, for use as a lookup table. Then do some experiments with a prototype, and adjust the values in the array until the behavior looks right.