There is a dirty way for this problem in my mind. Every time you execute a "ping <ipaddress>" command, the mac address of the remote host will be cached locally. When you execute "arp -a", you get a list of IPs and their corresponding MAC addresses from the local ARP cache. This table can be parsed get the MAC address.
Let's wait to hear from others too. There must be a "solution"!