Thermal fluctuations of the optical properties of nanomechanical photonic metamaterials