Optimal control of semilinear elliptic equations with applications to sublimation crystal growth