This is an indirect command. 'militibus' is dative masculine plural because in an indirect command, the verb 'impero, imperare, imperavi, imperatus' takes a dative subject - to order to someone to do something. 'dux milites iussit summa virtute pugnare' - with the verb 'iubeo, iubere, iussi, iussum', indirect commands follow the same construction as an indirect statement, which is the accusative plus infinitive construction. 'veto' also works in the same way for a negative indirect command.