The reflectivity of a novel InAs/GaAs 1-D resonant photonic crystal (RPC), consisting of 400 periods of InAs quantum dot (QD) layer and GaAs barrier layer, is theoretically investigated by using the transfer matrix method. In our calculations, both a homogeneous broadening (phonon-induced broadening) associated with temperature and other inhomogeneous broadening, rising from the QD size fluctuations in the QD layer, are taken into consideration. Numerical results show that the stopband reflectivity of the QD-RPC is very sensitive to both temperature and size fluctuations. The QD-RPC, as an all optical switch, has a high extinction ratio that can be up to 25 dB for a signal pulse duration of 60 ps at a temperature 10 K, and can be in excess of 10 dB at 70 K by using a pump (control) pulse less than 1 MW/cm2 for a given standard deviation of relative size fluctuation 0.2%. Also, the switch is characterized by spin-independent polarizations of both the signal and pump lights.