a decoupling capacitor , provides very low impedance.
since the capacitor impedance is dependent on frequency,
(1/(2*pi*f*C) , a decoupling capacitor is designed for action at certain freq.
(above the designed freq , it is giving essentilly very less impedance)
so , the cap value is calculated based on the freq and impedance reqd.
it is not that only electrolytic or ceramic , only the value is important.
in general , if the 'f' is very low , you get very large value of c and it is available in electolytic types.
if 'f' is high , you have low c and that is available in ceramic.