50v capacitor in a 40v circuit
Under full load you're close to 40V peak- you need to allow for high mains voltage and transformer regulation (voltage will rise under light load). 

50V should just be okay if transformer regulation is good (usually is for larger transformers). Elna is a good brand.