We present the results of a search for optical candidates of ultraluminous X-ray sources (ULXs) in two dwarf galaxies, NGC 4861 and NGC 4449, using Hubble Space Telescope (HST) archival data. With precise astrometry, we confirm that NGC 4861 X1 is associated with an HII complex and we conclude that NGC 4861 X2 resides in a young star group of mass 400 +/- 80 M-circle dot. We also find that NGC 4449 X7 is associated with three optical candidates within an error radius of 0.2arcsec at the 90 confidence level. Absolute magnitudes (M-v) of these candidates are determined as -5.0 and -4.1. The age and mass values for the three candidates are estimated as 40-50 Myr and similar to 8 M-circle dot, respectively, using stellar evolutionary tracks. The locations of optical candidates suggest a possible association with a nearby group of stars. In addition, we analysed previously unused archival data of XMM-Newton, Chandra, and Swift where the sources were detected. Although the X-ray spectral data do not allow us to discriminate between physical models, long-term data at hand are consistent with the sources being in luminous hard states.