Optical variability of intermediate mass black holes