Statistical and preequilibrium gamma ray emission in heavy ion reactions at 25 A.MeV