Ab initio shell model for A = 10 nuclei