Defense Secretary Frank Carlucci will visit the Soviet Union at the beginning of August, the official news agency Tass said Friday. It said the visit was part of a program of U.S.-Soviet exchanges but gave no dates or agenda. Earlier this month, Marshal Sergei Akhromeyev, Soviet armed forces chief of staff, visited the United State. In Ankara, official sources said Carlucci will visit Turkey Aug. 4-7 for talks on international secureity, the NATO alliance and modernization of the Turkish armed forces. He will hold talks with President Kenan Evren, who met President Reagan last month, Prime Minister Turgut Ozal and Defense Minister Ercan Vuralhan, they said.