A Brill-Noether theory for $k$-gonal nodal curves