Mechanism for linear and nonlinear optical effects in SrBe3O4 crystal