In wireless sensor networks (WSNs), reducing energy consumption of resource constrained sensor nodes is one of the most important issues. In this paper, we propose a task aware (TA) MAC protocol, which improves energy efficiency and throughput by introducing a channel access scheme depending on traffic load in WSNs. The amount of traffic load of a sensor node can be estimated by its task activity, where a task is an operation that the sensor node performs based on the schedule set by data dissemination procedures in advance. In addition, the sensor node collects neighbor nodes' task activities and determines its channel access probability using the collected information. Consequently, the sensor node can choose a more suitable channel access probability which is adaptive to its traffic load as well as neighbor's traffic load. We carry out performance analysis using a p-persistent MAC protocol. The results reveal that the TA-MAC protocol exhibits less collisions than the normal p-persistent MAC protocol and thus it achieves energy efficient operations. Also, it can been seen that the TA-MAC protocol improves system throughput compared with other protocols.