Decentralized cognitive radio networks (CRN) require efficient channel access protocols to enable cognitive secondary users (SUs) to access the primary channels in an opportunistic way without any coordination. In this paper, we develop a distributed spectrum access protocol for the case where the SUs aim to maximize the total system throughput while competing for spectrum resources. To model the competition amongst SUs, we formulate the spectrum access problem as a distributed welfare game, in which at each iteration each SU has to compute its marginal contribution to the system's welfare. Moreover, the SUs also need to decide which resource (channel) they should access at the next iteration. To address these challenges, we propose a stochastic learning algorithm based on payoff-based log-linear learning and prove its convergence towards a Pareto-efficient Nash equilibrium state.