Quasiperiodic versus irreversible dynamics of an optically confined Bose-Einstein condensate