Yes, look at the OS support DirSync can be installed on Windows 2012 R2. Having ADFS and Dirsync on the same machine you may want to look at performance and ensure you scale the server resources to acount for the load of running both of those services.
Set of Supported Operating Systems for Directory Sync tool has been updated
The set of Supported OSes that the Directory Sync tool (DirSync) can be installed on has been updated for version 1.0.6385.0012 (released 5/31/2013).
The Directory Sync tool must be installed on one of the following Server OSes:
•Windows Server 2008 SP1 or higher*
•Windows Server 2008 R2 SP1 or higher
•Windows Server 2012 or higher