Yes you could but I think a 24V transformer is oversized.
The LM7805 has a maximum voltage rating of 35V but using a 24V transformer, the rectifier voltage when the circuit is unloaded and the mains voltage is on the high side can be above 35V. I'd recommend using a 9V transformer with a 3300