NASCAR driver AJ Allmendinger will compete in two IndyCar races this season including May's Indianapolis 500 with Roger Penske's team.