Ballasts are designed for use with specific lamps. I would not automatically assume that a 40W ballast would work with a 20W lamp. It might, but this should be verified. The ballast provides starting voltage but also is designed to limit the current through the lamp during normal operation.