As the use of fruits is lawful for diet it is also lawful to apply as medicine. You may use it externally and eternally for medication. So you may apply lemon or onion in your feet in order to remove the sun tan.
Allah knows Best!
Darul Uloom Deoband