Wireless Sensor Networks (WSNs) comprising of battery-powered sensor nodes are being used in a wide range of applications. The feasibility of such applications is highly influenced by the longevity of these networks. In this work, we present a realistic WSN lifetime optimization framework where transmission power levels for both data and ACK packets are optimally selected (i.e., a complete link-layer handshaking cycle is modeled). Log-normal shadowing path loss model is employed to take into account the effects of path losses. We utilized the developed Mixed Integer Programming (MIP) based optimization framework to investigate the impact of data packet length on WSN lifetime. To quantify the effects of data packet length on network lifetime we explored the parameter space consisting of the number of nodes and node deployment density. Our results show that the optimal data packet length is the maximum allowed length.