Two different possible Lewis structures for GaN are shown below. The neutral structure on the left is probably a better representation since it has minimum formal charge while the structure on the right puts the positive charge on the more electronegative atom.
Now suppose a C atom is substituted into a N site. Two Lewis structures are shown below. The neutral structure on the left is probably the dominant resonance form but the ionic structure on the right delocalizes positive charge over any nitrogen in the lattice. The negative charge is not mobile since it is pinned to Ga atoms adjacent to C dopant atoms. Thus, this is a p-type semiconductor.