Hello,
The SPI operation always generates eight clock pulses as each byte is sent - there is no way to vary this.
However, assuming the slave device incorporates a simple shift register of length 20 bits, the sending more than 20 clock pulses will overflow the register, but this is potentially not a problem. Align the 20 data bits so that these are not the ones that overflow. For the usual operation of MSB sent first, the 20 bits would be right-aligned. The upper nybble of the first byte sent would be the overflow bits.
The assumption is that the data is strobed into the slave peripheral when the SS signal is raised. If the data is automatically strobed when a count of 20 bits is reached, a different approach would be required. In this case, the data would need to be left-aligned.
Knowledge of the slave peripheral you are using might permit a more definitive answer.
Regards,
Mac