Modeling and cavity optimization of an external cavity semiconductor laser