Automated spatial and temporal shaping of femtosecond pulses