Constraints on Ultralight Dark Matter with an Optical Lattice Clock