40W is a a lot of light over that sized tank. It could be done, but you would need to inject CO2
and be prepared for a fertilizer dosing regiment.
Also, it will be about more than just wattage. The type of light you choose will have an impact on the PAR rating you achieve at the substrate.
It would be best to get an idea of what kind of scape you want to do, and add equipment according to the requirements of the specimens you choose. 40W would be overkill if you just want to grow java ferns... But it would be cool if you want to grow HC and rotala macranda and want to setup a high tech tank.