Catalysis of the reaction: UDP-N-acetylmuramoyl-L-alanyl-D-glutamyl-L-lysine + ATP + D-alanyl-D-alanine = phosphate + UDP-N-acetylmuramoyl-L-alanyl-D-glutamyl-L-lysyl-D-alanyl-D-alanine + ADP.
UDP-N-acetylmuramoyl-L-alanyl-D-glutamyl-L-lysyl-D-alanyl-D-alanine synthetase activity