The IEEE community is working on the wireless access in vehicular environments as a main technology for vehicular ad hoc networks. The medium access control (MAC) protocol of this system known as IEEE 802.11p is based on the distributed coordination function (DCF) of the IEEE 802.11 and enhanced DCF of the IEEE 802.11e that have low performance especially in high-density networks with nodes of high mobility. In this paper, we propose a novel MAC protocol where nodes dynamically organize themselves into clusters. Cluster heads are elected based on their stability on the road with minimal overhead since all clustering information is embedded in control channel's safety messages. The proposed MAC protocol is adaptable to drivers' behavior on the road and has learning mechanism for predicting the future speed and position of all cluster members using the fuzzy logic inference system. By using OFDMA, each cluster will use a set of subcarriers that are different from the neighboring clusters to eliminate the hidden terminal problem. Increasing the system reliability, reducing the time delay for vehicular safety applications and efficiently clustering vehicles in highly dynamic and dense networks in a distributed manner are the main contributions of our proposed MAC protocol.