The FBI is investigating a shooting in Texas, which erupted a day after the US and Israel launched an attack on Iran, as a potential act of terrorism.