This assumes routing is working between the router and the TFTP server. Of course, there needs to be routes between 10.20.0.1 and 10.40.0.1.
For ping, you will need to permit ICMP echo-requests from 10.40.0.1 to 10.20.0.1, and ICMP echo-replies from 10.20.0.1 to 10.40.0.1.
For TFTP itself, The router will make a read or write request to UDP port 69 on 10.20.0.1. The TFTP server will reply, but the TFTP transfer will happen on high UDP ports. See http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00807ee585.shtml for more on enabling TFTP through an ASA firewall.