Device-to-device (D2D) communications, one of the major component of the evolving 5G networks, is showing promising advantages on supporting machine-to-machine (M2M) communications. In this paper, we consider the design of efficient transmission strategy selection algorithm for M2M communications underlaying cellular networks. First, a group of machine type-devices (MTDs) is matched with a particular user equipment (UE). MTDs belonging to the same group can access the same spectrum within its matched UE while the latter quality of service (QoS) is maintained. Next, we propose an efficient evolutionary game based transmission strategy selection algorithm for M2M communications using D2D mode. Specifically, MTDs switch opportunistically from a non-cooperative strategy to a cooperative strategy. Initially, we consider a non-cooperative scenario due to the selfish behavior of devices. In case the latter QoS is not satisfied, MTDs switch to a cooperative game. In a cooperative game, we propose two alternative power control schemes: a fixed mixed-strategy power control scheme where each MTD willing to play cooperatively selects the power strategy from a discrete level of powers and an adaptive mixed-strategy power control scheme. The latter technique enables to set efficiently the discrete power levels using a fuzzy logic and a proportional-integral-derivative (PID) controllers aiming to assure the desired QoS of UEs while maximizing the efficiency of M2M communications. Simulation results show that the evolutionary game based transmission strategy selection algorithm avoids significant degradation of traditional human-to-human (H2H) services in terms of throughput and fairness compared to a single non-cooperative game strategy. Besides, the adaptive mixed-strategy power control scheme outperforms the fixed mixed-strategy power control scheme by saving the battery life of MTDs while guaranteeing the latter QoS.