Hi Ali211,
Yes you can use an external sample clock source for the digital input/output clock. You can connect the external clock source to any one of the PFI lines (PFI0-PFI15) and specify the sample clock source as this external PFI line.
There are a couple DAQmx shipping examples that you can start with. Find the examples by going to Help >> Find Examples... in LabVIEW.
DAQmx Continuously Read Digital Channel with External Clock
DAQmx Write Digital Channel- External Clock
Hopefully this helps.
Chris G
Applications Engineer
National Instruments