Efficient Cross-Layer Optimization Algorithm for Data Transmission in Wireless Sensor Networks. (10th December 2015)