Effective production of gammas, positrons, and photonuclear particles from optimized electron acceleration by short laser pulses in low-density targets