US President Barack Obama has accepted PM Modi's invitation and will be the chief guest at India's Republic Day parade in January.