Analytical solutions for a two-level system driven by a class of chirped pulses