We study the phase diagram of the extended Hubbard model on a two-dimensional square lattice, including on-site (U) and nearest-neighbor (V) interactions, at weak couplings. We show that the charge-density wave phase that is known to occur at half filling when 4V>U gives way to a dxy-wave superconducting instability away from half filling, when the Fermi surface is not perfectly nested, and for sufficiently large repulsive V and a range of on-site repulsive interaction U. In addition, when nesting is further suppressed and in the presence of a nearest-neighbor attraction, a triplet time-reversal breaking (px+ipy)-wave pairing instability emerges, competing with the dx2-y2pairing state that is known to dominate at fillings just slightly away from half. At even smaller fillings, where the Fermi surface no longer presents any nesting, the (px+ipy)-wave superconducting phase dominates in the whole regime of on-site repulsions and nearest-neighbor attractions, while dxypairing occurs in the presence of on-site attraction. Our results suggest that zero-energy Majorana fermions can be realized on a square lattice in the presence of a magnetic field. For a system of cold fermionic atoms on a two-dimensional square optical lattice, both an on-site repulsion and a nearest-neighbor attraction would be required, in addition to rotation of the system to create vortices. We discuss possible ways of experimentally engineering the required interaction terms in a cold atom system. © 2013 American Physical Society.