Optimal Control Theory Techniques for Nitrogen Vacancy Ensembles