Sodium Iodide doped with Thallium NaI(Tl) scintillation detectors have potential for the development of an active dosimeter for photon radiation. We aim to show that the photon dosimetry response for NaI(Tl) scintillation detector may be optimized by employing the Particle Swarm optimization algorithm, when the selective data sampling is applied for the detector readout. In this work, Sodium Iodide doped with Thallium NaI(Tl) scintillation detector is considered due to being highly sensitive to gamma radiation, and one of the affordable room temperature detectors. In this research, we intend to measure the dosimetry response of the NaI(Tl) detector for various gamma sources, as an example, by measuring the ambient dose equivalent H*(10) for different gamma radioactive sources. Furthermore, we demonstrate that the photon dosimetry response may be well optimized for various energies, especially at lower energies, by increasing the energy interval number in data sampling over the NaI(Tl) scintillation detector readout with the help of an optimization algorithm. The simulation software Geant4 has been used for determining the NaI(Tl) scintillation detector readout. To this end, experimental ambient dose equivalent measurements for gamma radiation sources are compared with the theoretical results. As three and six energy intervals are considered for the selective data sampling along with an optimization algorithm based on NaI(Tl) detector output, the error percentage will be less than 20 and 10%, respectively.