Pena was 5-3 with a 4.24 ERA in 37 games for the Diamondbacks this season. He was 16-13 with a 4.08 ERA in 209 career games with Arizona. He began the season as the team's top setup man but had struggled in recent weeks, especially against left-handed hitters.
Pena has the franchise record in holds at 63.
Allen, 23, split time this season with Double-A Birmingham and Triple-A Charlotte, hitting a combined .281 with 16 doubles, three triples, eight homers and 43 RBIs. Allen was a fifth-round pick by the White Sox in the 2004 draft.