You do realize that you will probably need more than just an LED and a photodiode? Possibly transistors, resistors, and amplifiers?
I think that you have misunderstood the connections and the purpose of a UART.
Hardware UARTs on the Leonardo and the Mega have predefined pins whose numbers you cannot change. Software UARTs allow you to choose almost any pin numbers but often cannot handle transmitting and receiving simultaneously.
Good Luck with your changing specifications.