Yes you can definitely use the above mentioned microcontroller, moreover you can make use of many other microcontrollers as long as they solve your puprose. While selecting one, do check its datasheet for its voltage and current ratings and other related specifications.